<template>
  <view class="my-container">
    <!-- 个人中心 -->
    <my-userinfo v-if="token"></my-userinfo>
    <!-- 登录 -->
    <my-login v-else></my-login>
  </view>
</template>

<script>
import setBadge from '../../mixins/tabbar-badge.js';
import { mapState } from 'vuex';
export default {
  mixins: [setBadge],
  data() {
    return {};
  },
  computed: {
    ...mapState('user', ['token'])
  }
};
</script>

<style lang="scss">
  .my-container{
    height: 100%;
  }
</style>
